import request from '@/utils/request'

/**
 * 获取用户列表
 */

export const getUserListApi = data => {
  return request({
    method: 'get',
    url: '/ydd_user/list',
    params: data
  })
}

/**
 * 删除
 */
export const delUserInfoApi = id => {
  return request({
    method: 'get',
    url: `/ydd_user/del?id=${id}`
  })
}

/**
 * 新增
 */
export const addUserInfoApi = data => {
  return request({
    method: 'post',
    url: '/ydd_user/add',
    data
  })
}

/**
 * 用户详情
 */
export const getUserInfoDetailApi = id => {
  return request({
    method: 'get',
    url: `/ydd_user/rowInfo?id=${id}`
  })
}

/**
 * 提交
 */
export const editUserInfoApi = data => {
  return request({
    method: 'post',
    url: '/ydd_user/update',
    data
  })
}
